package com.freedom.pms.goods.infrastructure.persistence.pojo.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
public class AdminGoodsSpuDetailVO {

    @ApiModelProperty(value="id")
    private Integer id;

    @ApiModelProperty(value="店铺id")
    private Integer storeId;

    @ApiModelProperty(value="供应商id")
    private Integer supplierId;

    @ApiModelProperty(value="品牌ID")
    private Integer brandId;

    @ApiModelProperty(value="原产地id")
    private Integer originId;

    @ApiModelProperty(value="分类id")
    private Integer categoryId;

    @ApiModelProperty(value="仓库id")
    private Integer warehouseId;

    @ApiModelProperty(value="商品名称")
    private String productName;

    @ApiModelProperty(value="货号")
    private String itemNo;

    @ApiModelProperty(value="副标题")
    private String subTitle;

    @ApiModelProperty(value="视频链接")
    private String videoUrl;

    @ApiModelProperty(value="主图")
    private String primaryImage;

    @ApiModelProperty(value="详情网页内容")
    private String description;

    @ApiModelProperty(value="排序")
    private Integer sort;

    @ApiModelProperty(value="限购数量，0：不限购，其他数字表示限购的数量（单次提交订单限购，非用户限购）")
    private Integer limitNum;

    @ApiModelProperty(value="起订量")
    private Integer minBuyNum;

    @ApiModelProperty(value="步增量")
    private Integer stepNum;

    @ApiModelProperty(value="上架类型（1、手动上架 2、定时上架）")
    private Integer shelveType;

    @ApiModelProperty(value="定时上架时间")
    private Date timingShelveAt;

    @ApiModelProperty("商品轮播图")
    private List<String> carouselUrl;

    @ApiModelProperty("商品库存单元列表")
    private List<SkuInfo> skuList;

    @Data
    @ApiModel("商品Sku")
    public static class SkuInfo {

        private Integer id;

        @ApiModelProperty(value="商品id")
        private Integer spuId;

        @ApiModelProperty(value="SKU编号")
        private String skuCode;

        @ApiModelProperty(value="")
        private String skuName;

        @ApiModelProperty(value="成本价格")
        private BigDecimal costPrice;

        @ApiModelProperty(value="预警库存")
        private Integer lowStock;

        @ApiModelProperty(value="库存")
        private Integer stockNum;

        @ApiModelProperty(value="规格值图片")
        private String imgUrl;

        @ApiModelProperty(value="商品体积")
        private BigDecimal volumes;

        @ApiModelProperty(value="sku净重 单位:g")
        private BigDecimal weight;

        @ApiModelProperty(value="sku毛重，等于净重+包装（如：液体+瓶子），单位:毫克mg")
        private BigDecimal grossWeight;

        @ApiModelProperty(value="商品规格")
        private String specInfo;

        @ApiModelProperty(value="排序")
        private Integer sort;
    }
}
